Conversation
🦋 Changeset detectedLatest commit: 0e31479 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
7932c2f to
25b3f44
Compare
|
Testing this branch on my project and uploading files through The error is throwed at this line: https://github.com/hattipjs/hattip/blob/15aa5ae4dec4478aa07785c85b2c85d4a753d0af/packages/base/multipart/src/form-data.ts#L79 It looks like with the changes in this branch, the upload doesn't set proper multipart boundaries anymore 🤔. The condition leading to the throw is (Reference: https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html) |
|
Seemed like explicit definition of |
|
Whats the latest on this pr? |
|
@brenelz nothing much, but I haven't tested since the last commit lol |
820baec to
db436df
Compare
db436df to
0defa47
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Seroval serialization layer for server functions with an opt-in response mode (js vs json, defaulting to json) to improve CSP compatibility, and expands the server-function transport to support more body types.
Changes:
- Bumped
seroval/seroval-pluginsto^1.5.0. - Added a new serialization module plus shared body-format helpers to support JS-stream vs JSON-stream response deserialization and additional body types (FormData, File, Blob, ArrayBuffer, Uint8Array, etc.).
- Added new e2e/demo routes and tests for server-function round trips.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates lockfile for seroval/seroval-plugins upgrade. |
| packages/start/package.json | Bumps seroval and seroval-plugins dependency ranges. |
| packages/start/src/config/index.ts | Adds serialization.mode option and injects SEROVAL_MODE define. |
| packages/start/src/server/serialization.ts | Introduces streaming serializer/deserializer utilities for JS and JSON modes. |
| packages/start/src/server/server-functions-shared.ts | Adds body-format header constants + helpers for encoding/decoding request/response bodies. |
| packages/start/src/server/server-runtime.ts | Updates client runtime to use the new serialization/body extraction helpers. |
| packages/start/src/server/server-functions-handler.ts | Updates server handler to use the new serialization + body extraction helpers. |
| apps/tests/src/routes/server-function-ping.tsx | Adds a basic server-function route for testing. |
| apps/tests/src/routes/server-function-form-data.tsx | Adds a FormData/File server-function route for testing. |
| apps/tests/src/routes/server-function-blob.tsx | Adds a Blob server-function route for testing. |
| apps/tests/src/e2e/server-function.test.ts | Adds new e2e tests for ping and FormData server functions. |
| .changeset/plenty-geese-enter.md | Adds changeset entry for the feature. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pretty straight forward. Adds an opt-in mode to use json mode (set by default) for seroval streaming, this is because the js stream is affected by CSP.
Also adds streaming support for client-to-server communication (except for url-encoded requests), assuming that the browser it comes from supports it.